const request = require("superagent");


module.exports = class IP {
    constructor(){
      this.token = null
    }
    sleep(time){
      return new Promise((resolve, reject)=>{
        setTimeout(resolve, time)
      })
    }
    async getIp(){
      try{
        const ipReq = await request.get(`https://6.ipw.cn/`);
        return ipReq.text;
      }catch (e) {
        this.token = null
      }
    }
  };